package com.siam.system.modular.package_user.service_impl;


import cn.hutool.core.bean.BeanUtil;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.siam.system.modular.package_user.entity.School;
import com.siam.system.modular.package_user.mapper.SchoolMapper;
import com.siam.system.modular.package_user.model.param.SchoolParam;
import com.siam.system.modular.package_user.service.SchoolService;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class SchoolServiceImpl extends ServiceImpl<SchoolMapper, School> implements SchoolService {
    @Override
    public List<School> getList(SchoolParam schoolParam) {
        School school = BeanUtil.copyProperties(schoolParam, School.class);
        List<School> schools = this.baseMapper.selectList(new QueryWrapper<>(school));
        return schools;
    }
}
